package com.example.ams.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.sql.Time;
import java.util.Date;

/**
 * 班次设置数据传输对象
 * Shift Setting DTO
 */
public class ShiftSettingDTO {

    private Long id;

    @NotNull(message = "上班时间不能为空")
    private String workStart; // HH:mm:ss 格式

    @NotNull(message = "下班时间不能为空")
    private String workEnd; // HH:mm:ss 格式

    @NotNull(message = "迟到容差不能为空")
    private Integer lateGraceMin;

    @NotNull(message = "早退容差不能为空")
    private Integer earlyGraceMin;

    @NotNull(message = "生效日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date effectiveDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createdAt;

    // Constructors
    public ShiftSettingDTO() {
    }

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getWorkStart() {
        return workStart;
    }

    public void setWorkStart(String workStart) {
        this.workStart = workStart;
    }

    public String getWorkEnd() {
        return workEnd;
    }

    public void setWorkEnd(String workEnd) {
        this.workEnd = workEnd;
    }

    public Integer getLateGraceMin() {
        return lateGraceMin;
    }

    public void setLateGraceMin(Integer lateGraceMin) {
        this.lateGraceMin = lateGraceMin;
    }

    public Integer getEarlyGraceMin() {
        return earlyGraceMin;
    }

    public void setEarlyGraceMin(Integer earlyGraceMin) {
        this.earlyGraceMin = earlyGraceMin;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
}

